

<div data-role="main" class="ui-content" >
                <?php
                     foreach($listTache as $tache){
                         echo '<button onclick="loadTache('.$tache->getIdTache().','.$tache->getIdProjet().',\''.$headerText.'\');" class="ui-btn ui-icon-grid ui-btn-icon-right ui-btn-corner-all" >'.utf8_encode($tache->getLibelleTache()).'</button>';
                     }
                ?>  
</div>

<div data-role="footer"  data-position="fixed"  >
    <?php 
        if ( $headerText == 'Rappels' ){
            echo ' <center>  Rappels </center>';  
        }else {
            // if ( $headerText == 'TacheProjet' )
            echo ' <center> <a href="" data-transition="slide" class="ui-btn ui-corner-all ui-icon-plus ui-btn-icon-left" onclick="newTache('.$id.');" >Ajouter une tâche</a> </center>'; 
        }
    ?>
</div>

<script>
    
    function loadTache(id,idproj,header){
        window.location="Tache.php?id="+id+"&act=r&idPro="+idproj+"&hd="+header;
    }
    
    function newTache(idproj){
        window.location="Tache.php?act=c&idPro="+idproj;
    }
    
</script>

